home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / ABUSESRC.ZIP / AbuseSrc / macabuse / src / net / sock.c
Encoding:
C/C++ Source or Header  |  1997-05-20  |  800 b   |  29 lines

  1. #include "sock.hpp"
  2. #include <stdlib.h>
  3. #include "dprint.hpp"
  4. //#include "stdio.h"
  5. //#define dprintf printf
  6.  
  7. const char notify_signature[] = "I wanna play ABUSE!";
  8. const char notify_response[] = "Yes!";
  9.  
  10. net_protocol *net_protocol::first=0;
  11.  
  12. // connect to an explictedly named address
  13. // first try to get the address and then try to connect
  14. // return NULL if either fail.  This method does not need to be implemented
  15. // in sub-classes
  16.  
  17. net_socket *net_protocol::connect_to_server(char *&server_name, int port, int force_port, net_socket::socket_type sock_type)
  18. {
  19.     dprintf("Don't execute this!\n");
  20.     return 0;
  21.  
  22.   net_address *a=get_node_address(server_name,port,force_port);
  23.   if (!a) return NULL;
  24.   net_socket *s=connect_to_server(a,sock_type);
  25.   delete a;
  26.   return s;
  27. }
  28.  
  29.